<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button class="testpost">testpost</button>
    <button class="testget">testget</button>
    <script src="../jquery引入文件/jquery-1.12.4.min.js"></script>
    <script>
       $('.testpost').click(()=>{
        // console.log("jquery绑定事件")
        $.ajax({
            method:'post',
            url:'http://localhost:3000/post2',
            data:{
                    name:'tom',
                    age:200
                },
             success:(data)=>{
                console.log(data);
             },
             error:(err)=>{
                console.log(err);
             }
        })
       })
    </script>
</body>
</html>